#ifndef ir_h
#define ir_h

/************************************************************************************************* 

	Name: IR_H
	Autor: JA&AP
	
	Contains: 
				Header File containing all the functions related to the IRSensors hardware.
				
				
**************************************************************************************************/

//IR constant to access each IR-sensor
#define IR_80N 0
#define IR_45N 1
#define IR_10N 2
#define IR_10P 3
#define IR_45P 4
#define IR_80P 5


/*************************************************************************
Routine: 	READIR
Purpose:  	Reads the value of each one of the IR sensors
In:			void
Out:		char value that contains the result of the IR register
**************************************************************************/
char ir_readAll(void);

/*************************************************************************
Routine: 	CONFIGIR
Purpose:  	Configure the hardware that deals with the IR Sensors.
In:			float frequency of update
Out:		void
**************************************************************************/
void ir_init(void );

/*************************************************************************
Routine: 	CONFIGIR
Purpose:  	Configure the hardware that deals with the IR Sensors.
In:			float frequency of update
Out:		void
**************************************************************************/
//esta funcion no debe ser publica, no sirve de nada habilitar el IR si no se modula la señal
//void ir_enable(unsigned char ir,unsigned char en);

/*************************************************************************
Routine: 	CONFIGIR
Purpose:  	Configure the hardware that deals with the IR Sensors.
In:			float frequency of update
Out:		void
**************************************************************************/
unsigned char ir_getState(unsigned char ir);

unsigned char ir_read(void);

//se esta haciendo un barrido 
void ir_activate(unsigned char ir,unsigned char en);
void ir_activateAll(unsigned char en);




#endif
